/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package CarProject.util;

import CarProject.*;

import java.util.List;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see CarProject.CarProjectPackage
 * @generated
 */
public class CarProjectSwitch {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static CarProjectPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CarProjectSwitch() {
		if (modelPackage == null) {
			modelPackage = CarProjectPackage.eINSTANCE;
		}
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	public Object doSwitch(EObject theEObject) {
		return doSwitch(theEObject.eClass(), theEObject);
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	protected Object doSwitch(EClass theEClass, EObject theEObject) {
		if (theEClass.eContainer() == modelPackage) {
			return doSwitch(theEClass.getClassifierID(), theEObject);
		}
		else {
			List eSuperTypes = theEClass.getESuperTypes();
			return
				eSuperTypes.isEmpty() ?
					defaultCase(theEObject) :
					doSwitch((EClass)eSuperTypes.get(0), theEObject);
		}
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	protected Object doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
			case CarProjectPackage.VUE_GENERALE: {
				VueGenerale vueGenerale = (VueGenerale)theEObject;
				Object result = caseVueGenerale(vueGenerale);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.VUE_MENU: {
				VueMenu vueMenu = (VueMenu)theEObject;
				Object result = caseVueMenu(vueMenu);
				if (result == null) result = caseVueGenerale(vueMenu);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.VUE_FORMULAIRE: {
				VueFormulaire vueFormulaire = (VueFormulaire)theEObject;
				Object result = caseVueFormulaire(vueFormulaire);
				if (result == null) result = caseVueGenerale(vueFormulaire);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.ACTION: {
				Action action = (Action)theEObject;
				Object result = caseAction(action);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.AJOUTER: {
				Ajouter ajouter = (Ajouter)theEObject;
				Object result = caseAjouter(ajouter);
				if (result == null) result = caseAction(ajouter);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.SUPPRIMER: {
				Supprimer supprimer = (Supprimer)theEObject;
				Object result = caseSupprimer(supprimer);
				if (result == null) result = caseAction(supprimer);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.MODIFIER: {
				Modifier modifier = (Modifier)theEObject;
				Object result = caseModifier(modifier);
				if (result == null) result = caseAction(modifier);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.LISTER: {
				Lister lister = (Lister)theEObject;
				Object result = caseLister(lister);
				if (result == null) result = caseAction(lister);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.CHAMPS: {
				Champs champs = (Champs)theEObject;
				Object result = caseChamps(champs);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.TABLE: {
				Table table = (Table)theEObject;
				Object result = caseTable(table);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.BASE_DONNEES: {
				BaseDonnees baseDonnees = (BaseDonnees)theEObject;
				Object result = caseBaseDonnees(baseDonnees);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.SITE_WEB: {
				SiteWeb siteWeb = (SiteWeb)theEObject;
				Object result = caseSiteWeb(siteWeb);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.CLE: {
				cle cle = (cle)theEObject;
				Object result = casecle(cle);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.PRIMAIRE: {
				Primaire primaire = (Primaire)theEObject;
				Object result = casePrimaire(primaire);
				if (result == null) result = casecle(primaire);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CarProjectPackage.VUE_PAR_DEFAUT: {
				VueParDefaut vueParDefaut = (VueParDefaut)theEObject;
				Object result = caseVueParDefaut(vueParDefaut);
				if (result == null) result = caseVueGenerale(vueParDefaut);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Vue Generale</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Vue Generale</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseVueGenerale(VueGenerale object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Vue Menu</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Vue Menu</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseVueMenu(VueMenu object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Vue Formulaire</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Vue Formulaire</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseVueFormulaire(VueFormulaire object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Action</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Action</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseAction(Action object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Ajouter</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Ajouter</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseAjouter(Ajouter object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Supprimer</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Supprimer</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseSupprimer(Supprimer object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Modifier</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Modifier</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseModifier(Modifier object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Lister</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Lister</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseLister(Lister object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Champs</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Champs</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseChamps(Champs object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Table</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Table</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseTable(Table object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Base Donnees</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Base Donnees</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseBaseDonnees(BaseDonnees object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Site Web</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Site Web</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseSiteWeb(SiteWeb object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>cle</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>cle</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object casecle(cle object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Primaire</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Primaire</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object casePrimaire(Primaire object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Vue Par Defaut</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Vue Par Defaut</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public Object caseVueParDefaut(VueParDefaut object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
	 * @generated
	 */
	public Object defaultCase(EObject object) {
		return null;
	}

} //CarProjectSwitch
